<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>"/>
<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>"/>
<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>"/>
<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>"/>
<div class="t_bar"><span class="color_red">*</span>项目基本情况</div>
	<table class="t_css" id="eq_table0" width="100%" border="0" cellpadding="0" cellspacing="1">
		<col width="20%"/>
		<col width="30%"/>
		<col width="20%"/>
		<col width="30%"/>
	
	    <tr >
	        <td align="right">实验室名称：</td>
	        <td colspan="3">
	        	<input type='text' name='proposal/zh_title' id='zh_title' style="width: 88%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/zh_title"/>' label="实验室名称">
	        </td>
	    </tr>
	    <tr>
	       <td align="right">实验室批准日期：</td>
	       <td>
	           <c:set var="ratify_time"><x:out select="$xmlData/data/proposal/ratify_time" /></c:set>
               <cpt:date id="ratify_time" name="proposal/ratify_time" value="${ratify_time}" className="required date" label="实验室批准日期"></cpt:date> 
	       </td>
	       <td align="right">实验室验收日期：</td>
           <td>
               <c:set var="reception_time"><x:out select="$xmlData/data/proposal/reception_time" /></c:set>
               <cpt:date id="reception_time" name="proposal/reception_time" value="${reception_time}" className="required date" label="实验室验收日期"></cpt:date>
           </td>
	    </tr>
	     <tr>
	        <td align="right">单位类型：</td>
	        <td colspan="3" align="center">
	            <c:set var="org_type6"><x:out select="$xmlData/data/proposal/org_type6_value" /></c:set> 
	            <cpt:checkbox key="org_type6" name="org_type6"  width="70px"  repeatColumn="2" value="${org_type6 }"  tagType="radio" ></cpt:checkbox>
	            <input type="hidden" id="org_type6_value" name="proposal/org_type6_value" class="required" value="${org_type6 }" label="单位类型"> 
	            <input type="hidden" id="org_type6_name" name="proposal/org_type6_name" value="<x:out select="$xmlData/data/proposal/org_type6_name" />">
	        </td>
        </tr>
        <tr>
	       <td align="right">实验室批文：</td>
	       <td>
	       		<input type="text" label="实验室批文" name="proposal/laboratory_approval" class="input_css required " maxlength="50" value="<x:out select="$xmlData/data/proposal/laboratory_approval" />"/>
           </td>
	       <td align="right">批文时间：</td>
           <td>
               <c:set var="approval_time"><x:out select="$xmlData/data/proposal/approval_time" /></c:set>
               <cpt:date id="approval_time" name="proposal/approval_time" value="${approval_time}" className="required date" label="批文时间"></cpt:date>
           </td>
	    </tr>
	    <tr>
	       <td align="right">实验室所在重点学科名称：</td>
	       <td colspan="3">
	       		<input type="text" label="实验室所在重点学科名称" style="width: 88%" name="proposal/laboratory_key_subject" class="input_css required " maxlength="200" value="<x:out select="$xmlData/data/proposal/laboratory_key_subject" />"/>
           </td>
        </tr>
	    <tr >
            <td align="right">科研管理部门联系人姓名：</td>
            <td>
                <input  type="text" label="科研管理部门联系人姓名" name="proposal/administrative_department_name" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/administrative_department_name" />">
                <span name="proposal/contact_email" style="display: none;"> 
                    <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>
                </span>
                <span name="proposal/contact_tel" style="display: none;"> 
                    <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>
                </span>
            </td>
            <td align="right">联系人手机：</td>
            <td>
                <input type="text" label="联系人手机" name="proposal/administrative_department_mobile" class="input_css required mobile" onfocus="InitInput.setNumber(this,11,0,0)" maxlength="50" value="<x:out select="$xmlData/data/proposal/administrative_department_mobile" />">
            </td>
        </tr>
        <tr>
            <td align="right">项目报审级次：<br/>（省补助资金拨付所属财政局）</td>
            <td >
                <c:set var="sub_step">{'id':'<x:out select="$xmlData/data/proposal/sub_step_value" />','name':'<x:out select="$xmlData/data/proposal/sub_step_name" />'}</c:set>
                <cpt:tree key="sub_step" cacheable="false" className="hn_iuput_kuang  gray" readonly="true" value="${sub_step}"  label="项目报审级次" 
                    id="sub_step" onlyChooseLeaf="false" showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />
                <input id="sub_step_value" type="hidden" name="proposal/sub_step_value" class="required" label="项目报审级次" value="<x:out select="$xmlData/data/proposal/sub_step_value" />"/>
                <input id="sub_step_name" type="hidden" name="proposal/sub_step_name"  value="<x:out select="$xmlData/data/proposal/sub_step_name" />"/>
            </td>
            <td align="right">项目申请金额<br/>（万元）：</td>
            <td>
                <input type='text' name='proposal/request_amt' class="input:css required" id='request_amt' onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/request_amt"/>' label="项目申请金额">
            </td>
        </tr>
	    <tr >
	        <td align="right">归口管理部门：</td>
	        <td colspan="3">
	        	<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
				<cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}"  label="归口管理部门"
         			id="recomend_org" onlyChooseLeaf="false"  showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />
				<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  class="required"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
				<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
				
 			</td>
	    </tr>
	</table>
	
	
    <!-- 联系方式-->
    <div class="t_bar">
        <span class="color_red">*</span>联系方式
    </div>
    <table class="t_css" id="eq_table1" width="100%" border="0" cellpadding="0" cellspacing="1">
		<col width="20%"/>
		<col width="30%"/>
		<col width="20%"/>
		<col width="30%"/>
	    <tr >
            <td align="right">主任姓名：</td>
            <td>
                <input  type="text" label="主任姓名" name="proposal/director_contact_name" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/director_contact_name" />">
                <span name="proposal/contact_email" style="display: none;"> 
                    <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>
                </span>
                <span name="proposal/contact_tel" style="display: none;"> 
                    <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>
                </span>
            </td>
            <td align="right">主任联系电话：</td>
            <td>
                <input type="text" label="主任联系电话" name="proposal/director_contact_mobile" class="input_css required" maxlength="20" value="<x:out select="$xmlData/data/proposal/director_contact_mobile" />">
            </td>
        </tr>
        <tr >
            <td align="right">联系人姓名：</td>
            <td>
                <input  type="text" label="联系人姓名" name="proposal/person_contact_name" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/person_contact_name" />">
                <span name="proposal/contact_email" style="display: none;"> 
                    <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>
                </span>
                <span name="proposal/contact_tel" style="display: none;"> 
                    <x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>
                </span>
            </td>
            <td align="right">联系人联系电话：</td>
            <td>
                <input type="text" label="联系人联系电话" name="proposal/person_contact_mobile" class="input_css required" maxlength="20" value="<x:out select="$xmlData/data/proposal/person_contact_mobile" />">
            </td>
        </tr>
        <tr>
            <td align="right">地址：</td>
            <td colspan="3">
                <input type="text" label="地址"  style="width: 88%" name="proposal/person_contact_address" class="input_css required" maxlength="100" value="<x:out select="$xmlData/data/proposal/person_contact_address" />">
            </td>
        </tr>
	    <tr>
            <td align="right">邮编：</td>
            <td>
                <input  type="text" label="邮编" name="proposal/person_contact_postcode" onkeyup="this.value=this.value.replace(/\D/g,'')"  onafterpaste="this.value=this.value.replace(/\D/g,'')" class="input_css required"  maxlength="6" value="<x:out select="$xmlData/data/proposal/person_contact_postcode" />">
            </td>
            <td align="right">电子邮件：</td>
            <td>
                <input type="text" label="电子邮件" name="proposal/person_contact_email" class="input_css required email" value="<x:out select="$xmlData/data/proposal/person_contact_email" />">
            </td>
        </tr>
    </table>
    
    <!-- 科研基础条件 -->
    <div class="t_bar">
        <span class="color_red">*</span>科研基础条件
    </div>
    <table class="t_css" id="eq_table2" width="100%" border="0" cellpadding="0" cellspacing="1">
		<col width="20%"/>
		<col width="30%"/>
		<col width="20%"/>
		<col width="30%"/>
        <tr>
            <td align="right">上一年度依托单位经费投入（万元）：</td>
            <td>
                <input type='text' name='proposal/last_year_institutions_expenses' class="input:css required" id='last_year_institutions_expenses' onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/last_year_institutions_expenses"/>' label="上一年度依托单位经费投入">
            </td>
            <td align="right">上一年度获财政经费投入（万元）：</td>
            <td>
                <input type='text' name='proposal/last_year_finance_expenses' class="input:css required" id='last_year_finance_expenses' onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/last_year_finance_expenses"/>' label="上一年度获财政经费投入">
            </td>
        </tr>
        <tr>
	        <td align="right">评估周期内评估结果（<span name="proposal/stat_year">${statYear}</span>年度）：</td>
	        <td colspan="3" align="center">
	            <c:set var="assessment_results"><x:out select="$xmlData/data/proposal/assessment_result_value" /></c:set> 
	            <cpt:checkbox key="assessment_results" name="assessment_result"  width="70px"  repeatColumn="3" value="${assessment_results }"  tagType="radio" ></cpt:checkbox>
	            <input type="hidden" id="assessment_result_value" name="proposal/assessment_result_value" class="required" value="${assessment_results }" label="评估周期内评估结果"> 
	            <input type="hidden" id="assessment_result_name" name="proposal/assessment_result_name" value="<x:out select="$xmlData/data/proposal/assessment_result_name" />">
	        </td>
        </tr>
        <tr>
            <td align="right">经费用途（限280字）：</td>
            <td colspan="3">
                <textarea name="proposal/expenses_use" class="input_textarea required maxlength:280" style="resize: none;width: 600px; height: 200px" label="经费用途"><x:out select="$xmlData/data/proposal/expenses_use" /></textarea>
                <input type="hidden" name="proposal/expenses_use_hidden" value="<x:out select="$xmlData/data/proposal/expenses_use_hidden" />" />
            </td>
        </tr>
	</table>
    <!-- <script type="text/javascript">
    //在table标签内开头添加属性 
    $("table").prepend('<col style="width: 25%"/><col style="width: 25%"/><col style="width: 25%"/><col style="width: 25%"/>');
    </script>
	 -->
	<!-- 主要研究方向，可手动添加 -->
    <div class="t_bar">
        <span class="color_red">*</span>主要研究方向
    </div>
    <table  id="eq_table3" cellpadding="0" class="t_css" width="100%" border="0" cellpadding="0">
               <col style="width: 5%"/>
               <col style="width: 5%"/>
               <col style="width: 20%"/>
               <col style="width: 70%"/>
           <thead >
                   <tr style="border:1px solid #B7D1E6">
                       <th class="TblHead" align="center">选择</th>
                       <th class="TblHead" align="center">序号</th>
                       <th class="TblHead" align="center">带头人</th>
                       <th class="TblHead" align="center">主要研究方向</th>
                   </tr>
           </thead>
           <tbody id="tab">
                   <tr style="display:none">
                       <td align="center">
                           <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selMileStones" >
                       </td>
                       <td align="center">
                           <span name="research_methods|research_method[0]@seq_no" >[index]</span> 
                       </td>
                       <td align="center">
                           <input type="text" name="research_methods|research_method[0]|leader" class="hn_iuput_kuang1 required" maxlength="20" style="width:80%" label="带头人" value="" />
                       </td>
                       <td align="center">
                           <input type="text" name="research_methods|research_method[0]|research_method_content" class="hn_iuput_kuang1 required" maxlength="100" style="width:80%" label="主要研究方向" value="" />
                       </td>
                   </tr>
                   
                   
                   <c:set value="0" var="index" scope="page"/>
                   <x:forEach select="$xmlData/data/research_methods/research_method" var="research_method">
                   
                   <c:choose>
                       <c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
                       <c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
                   </c:choose>
                   <tr >
                       <td align="center">
                           <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selMileStones" >
                       </td>
                       <td align="center">
                           <span name="research_methods/research_method[${flag}${index}]@seq_no"><x:out select="$research_method/@seq_no"/></span> 
                       </td>
                       
                       <td align="center">
                           <input type="text" name="research_methods/research_method[${flag}${index}]/leader" value="<x:out select="$research_method/leader" />"  maxlength="20" class="hn_iuput_kuang required" style="width:80%" label="带头人 "/>
                       </td>
                       <td align="center">
                           <input type="text" name="research_methods/research_method[${flag}${index}]/research_method_content" class="hn_iuput_kuang1 required" maxlength="100" style="width:80%" label="主要研究方向" value="<x:out select="$research_method/research_method_content"/>"/>
                       </td>
                   </tr>
                   <c:set value="${index+1}" var="index" scope="page"/>
                   <script type="text/javascript">
                       showAllDateTag("eq_table3");
                   </script>
                   </x:forEach>
               </tbody>
       </table>
       <table width="98%" align="center">
               <tr >
                   <td>
                       <input class="button_02" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('eq_table3',999,'主要研究方向内容最多只能填写999条')){addNewRow('eq_table3');showDateTag('eq_table3');}try{top.resizeFrame();}catch(e){};">
                       <input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('eq_table3','selMileStones');">
                       <input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('eq_table3','selMileStones');">
                       <input class="button_02" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('eq_table3','主要研究方向');">
                   </td>
               </tr>
       </table>
<script type="text/javascript">

function initTreeValueExt(treeId, treeNode) {
 	if ((treeNode && treeNode.isParent)) {
 		scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
 		$("#" + treeId).val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId	+ "_value']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
 		return false;
 	}
 	var str = treeNode.name;
 	var obj = treeNode.parentNode;
 	while (obj != null) {
 		str = obj.name + "-" + str;
 		obj = obj.parentNode;
 	}
 	
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
}
</script>	